Skip to content

Query Frontend For Logical Query Plan Support #6884

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

rubywtl
Copy link
Contributor

@rubywtl rubywtl commented Jul 16, 2025

What this PR does:
This PR adds logical plan generation support to the query frontend as part of the distributed query execution implementation.

Features

  • Added middleware components for:
    • PromQL query parsing
    • Logical plan creation
    • Local optimization pipeline

    Note: Distributed optimizer will be implemented in a future stage

Configuration Changes

  • Added feature flag to query frontend configs to control distributed execution
  • Maintains backwards compatibility with existing Cortex data path

Testing Coverage

  • Integration Tests

    • Verified empty request body when feature flag is disabled
    • Validated existing data path functionality remains intact
  • Unit Tests

    • Confirmed middleware correctly serializes optimized logical query plans
    • Validated request encoding functionality

Which issue(s) this PR fixes:
Related to #6789

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated

@rubywtl rubywtl force-pushed the frontend/middleware-logicalplan-support branch 2 times, most recently from 7c03859 to 0d12680 Compare July 16, 2025 23:08
@rubywtl rubywtl force-pushed the frontend/middleware-logicalplan-support branch from 5b66cc6 to 22df406 Compare July 17, 2025 20:26
@rubywtl rubywtl force-pushed the frontend/middleware-logicalplan-support branch from 24b8251 to a278837 Compare July 17, 2025 22:19
Copy link
Contributor

@justinjung04 justinjung04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for a great start

Copy link
Contributor

@harry671003 harry671003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I like this initial implementation. Great work @rubywtl!

All my comments are minor.

I think we also need to update the formatting. Some of the imports are not sorted correctly.

@rubywtl rubywtl force-pushed the frontend/middleware-logicalplan-support branch from 399e190 to d09f3d0 Compare July 22, 2025 21:04
@rubywtl rubywtl force-pushed the frontend/middleware-logicalplan-support branch from d7507ae to 970ab81 Compare July 23, 2025 17:31
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge it! 💪
Great work. Thanks a lot!

@yeya24 yeya24 merged commit 6b3bd7b into cortexproject:master Jul 24, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants